﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint;
using System.Globalization;


public class LanguageManager
{
    public uint LCID { get; set; }

    private const string ResourceFileName = "NumbertoText";

    public LanguageManager(CultureInfo ci)
    {
        //CultureInfo ci = new CultureInfo(culture);
        LCID = (uint)ci.LCID;
    }

    public LanguageManager()
    {
        LCID = (uint)System.Threading.Thread.CurrentThread.CurrentUICulture.LCID;
    }


      


    public string GetLocalizedString(string key)
    {
        return SPUtility.GetLocalizedString("$Resources:" + key, ResourceFileName, LCID);
    }
}

